import 'package:flutter/cupertino.dart';
import 'package:flutter_massage/common_lib/index.dart';
import 'package:flutter_massage/common_lib/routers/route.dart';
import 'package:get/get.dart';

class ReportLogic extends GetxController {
  final TextEditingController textEditingController = TextEditingController();
  int select = 0;
  List<String> images = [];

  void onSubmit() {
    if (Loading.predicate(() => textEditingController.text.empty, '请填写举报描述')) return;
    if (Loading.predicate(() => images.isEmpty, '请上传图片证据')) return;
    Loading.show();
    Future.delayed(const Duration(seconds: 1), () {
      Loading.toast('举报成功', dismissLoading: true);
      CommonRoute.close();
    });
  }
}
